package com.trf.library.config;

import com.trf.library.interceptor.ReaderInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 小小唐
 * @Date 2023/4/8-星期六-0:26
 */
@Configuration
public class ReaderWebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ReaderInterceptor())
                .addPathPatterns("/admin/**");
    }
}
